<?php /* Smarty version Smarty-3.1.14, created on 2017-08-18 16:55:56
         compiled from "E:\phpStudy\WWW\zyshop\admin\templates\news_edit.html" */ ?>
<?php /*%%SmartyHeaderCode:207555996ab9c89ee98-97234759%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '03639af93ce51b67fb6ba1fa0775685420594465' => 
    array (
      0 => 'E:\\phpStudy\\WWW\\zyshop\\admin\\templates\\news_edit.html',
      1 => 1502503674,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '207555996ab9c89ee98-97234759',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'list' => 0,
    'edit' => 0,
    'type' => 0,
    'URL' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_5996ab9c90e1a4_47069011',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5996ab9c90e1a4_47069011')) {function content_5996ab9c90e1a4_47069011($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<style>
td {font-weight: bold;}
</style>
<body>
<div class="fixed-bar">
  <div class="item-title">
    <h3>编辑文章</h3>
  </div>
</div>
<div class="fixed_bottom">
  <form method="post" action="news_list.php" id="aspnetForm" name="form1" enctype="multipart/form-data">
  	<input type="hidden" name="ad_id" id="ad_id" value="<?php echo $_smarty_tpl->tpl_vars['list']->value['ad_id'];?>
" />
    <table style=" width:100%;" cellpadding="0" cellspacing="0" class="table tb-type2">
      <tbody>
        <tr>
          <td class="firtd"> 文章标题:</td>
          <td><input class="inputtxt" type="text" name="title" required value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['title'];?>
"> *</td> 
        </tr>
        <tr>
          <td class="firtd"> 上级分类:</td>
          <td>
              <select name="cat_id" onchange="get_news_type(this,this.value)" id="" required>
                  <option value='' id="option">请选择...</option>
                  <?php echo $_smarty_tpl->tpl_vars['type']->value;?>

              </select>*
          </td>
        </tr>
        <tr>
          <td class="firtd"> 文章重要性:</td>
          <td>
            <input style="width:30px;cursor:pointer;" type="radio" name="article_type" value="0" <?php if ($_smarty_tpl->tpl_vars['edit']->value['article_type']==0){?> checked="checked" <?php }?>>普通
             <input style="width:30px;cursor:pointer;" type="radio" name="article_type" value="1" <?php if ($_smarty_tpl->tpl_vars['edit']->value['article_type']==1){?> checked="checked" <?php }?>>置顶
          </td>
        </tr>
        <tr>
          <td class="firtd"> 是否显示:</td>
          <td>
            <input style="width:30px;cursor:pointer;" type="radio" name="is_open" value="1" <?php if ($_smarty_tpl->tpl_vars['edit']->value['is_open']==1){?> checked="checked" <?php }?>>显示
             <input style="width:30px;cursor:pointer;" type="radio" name="is_open" value="0" <?php if ($_smarty_tpl->tpl_vars['edit']->value['is_open']==0){?> checked="checked" <?php }?>>不显示
          </td>
        </tr>
        <tr>
          <td class="firtd"> 文章作者:</td>
          <td><input class="inputtxt" type="text" name="author" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['author'];?>
"></td>
        </tr>
        <tr>
          <td class="firtd"> 作者email:</td>
          <td><input class="inputtxt" type="text" name="author_email" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['author_email'];?>
"></td>
        </tr>
        <tr>
          <td class="firtd"> 关键字:</td>
          <td><input class="inputtxt" type="text" name="keywords" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['keywords'];?>
"></td>
        </tr>
        <tr>
          <td class="firtd"> 网页描述:</td>
          <td><textarea name="description" style="min-height:120px; max-height:120px;"><?php echo $_smarty_tpl->tpl_vars['edit']->value['description'];?>
</textarea></td>
        </tr>
        <tr>
          <td class="firtd"> 外部链接:</td>
          <td><input class="inputtxt" type="text" name="link" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['link'];?>
"></td>
        </tr>
        <tr>
          <td class="firtd"> 上传广告图片:</td>
          <td><input  style="width:150px;" type="file" name="file_url"><?php if ($_smarty_tpl->tpl_vars['edit']->value['file_url']){?>      当前文件<img width="100px;" src="../<?php echo $_smarty_tpl->tpl_vars['edit']->value['file_url'];?>
"/><?php }?></td>
        </tr>
        <tr>
          <td class="firtd"> 文章内容:</td>
          <td>
          	<script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['URL']->value;?>
resource/kindeditor/kindeditor.js"></script>
            <textarea style="width:700px; height:400px;" name="content" id="content"><?php echo $_smarty_tpl->tpl_vars['edit']->value['content'];?>
</textarea>
            <script>
				KindEditor.ready(function(K) {
					var editor1 = K.create('textarea[name="content"]', {
						allowFileManager : true,
						filterMode : false,
						afterBlur:function(){ 
							this.sync(); 
						}
					});
				});
			</script>
          </td>
        </tr>
        <tr>
          <td class="style1">&nbsp;</td>
          <td>
              <input type="hidden" name="act" value="edit">
              <input type="hidden" name="article_id" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['article_id'];?>
<">
              <a href="JavaScript:void(0);" class="btn" onclick="reset()"><span>重置</span></a>
              <a href="JavaScript:void(0);" class="btn" onclick="$('#tj').click()"><span>确认提交</span></a>
          </td>
        </tr>
      </tbody>
    </table>
    <input type="reset" id="cz" style="display: none;">
    <input type="submit" id="tj" style="display:none;";>
  </form>
</div>
</body>

<script>
// 重置方法
function reset(){
	$('input').val('');
	$('textarea').text('');
	$('select').val('');
}
//选择分类调用方法
function get_news_type(obj,id){
   if(id==1){
      alert("系统保留分类,不允许在该分类添加文章");
      $("#option").eq(0).attr("selected","selected");
   }
}
</script>
</html><?php }} ?>